<script setup>
import { HomeOutline, LogoWechat, MailOutline, LogoTux } from "@vicons/ionicons5";
const aboutList = [
  {
    title: 'Email: xiazai@111.com',
    icons: MailOutline
  },
  {
    title: 'QQ: 619363381',
    icons: LogoTux
  },
  {
    title: 'Wechat: xiacan0',
    icons: LogoWechat
  },
]
console.log((document.body.offsetWidth - 1200)/2)
</script>

<template>
  <div class="layout">
    <div class="photo">
      <img src="../../assets/img/photo.jpg">
    </div>
    <div class="nav">
      <ul>
        <li v-for="i in 6" :key="i">
          <n-icon size="20">
            <home-outline />
          </n-icon>
          <span>首页</span>
        </li>
      </ul>
    </div>
    <div class="divisionLine"></div>
    <div class="about">
      <div class="title">
        About Me
      </div>
      <ul>
        <li v-for="(item,index) in aboutList" :key="index">
          <n-icon size="18"  :component="item.icons">
          </n-icon>
          <span>{{item.title}}</span>
        </li>
      </ul>
    </div>
    <div class="divisionLine"></div>
    <div class="total">
      <div class="title">
        站点统计
      </div>
      <div class="total-list">
        <div class="item" v-for="i in 4">
          <span>片刻</span>
          <span class="num">21</span>
        </div>
      </div>
    </div>
  </div>
</template>


<style lang="less" scoped>
.layout{
  width: 300px;
  height: 100vh;
  background: #ebeef5;
  //头像
  .photo{
    padding: 0 30px;
    margin-top: 20px;
    width: 50px;
    height: 50px;
    img{
      border-radius: 50%;
      width: 100%;
      height: 100%;
    }
  }
  //导航
  .nav{
    box-sizing: border-box;
    padding: 0 30px;
    margin-top: 50px;
    width: 100%;
    li{
      display: flex;
      align-items: center;
      box-sizing: border-box;
      padding: 10px 10px;
      height: 48px;
      border-radius: 6px;
      &:hover{
        color: #409EFF;
        background: rgba(198,219,206,.3);
      }
      span{
        margin-left: 10px;
      }
    }
  }
  //分割线
  .divisionLine{
    margin: 26px 0;
    width: 100%;
    height: 1px;
    background-color: #dcdfe6;
  }
  //关于我
  .about{
    box-sizing: border-box;
    padding: 0 30px;
    font-size: 14px;
    color: #9098a7;
    font-weight: 600;
    .title{
      margin-bottom: 15px;
    }
    ul{
      li{
        display: flex;
        align-items: center;
        padding-bottom: 5px;
        span{
          margin-left: 6px;
          font-size: 14px;
          color: #89978c;
          font-weight: 400;
        }
      }
    }
  }
  //站点统计
  .total{
    box-sizing: border-box;
    padding: 0 30px;
    .title{
      margin-bottom: 15px;
      font-size: 14px;
      color: #9098a7;
      font-weight: 600;
    }
    .total-list{
      display: flex;
      justify-content: space-between;
      flex-wrap: wrap;
      .item{
        list-style: none;
        display: flex;
        flex-direction: column;
        width: 38%;
        align-items: flex-start;
        background: linear-gradient(90deg,#f6faf8,#409eff00);
        border-radius: 5px;
        margin-bottom: 10px;
        padding: 8px 12px 5px;
        box-shadow: 0px 8px 9px 0px rgb(235 238 245 / 29%);
        span{
          font-size: 14px;
          color: #409effa6;
        }
        .num{
          margin-top: 5px;
          font-weight: 600;
        }
      }
    }
  }

}
</style>
